From d5ade2359539648845a5854ed353b29367961d74 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Mon, 20 Nov 2023 11:02:20 +0100 Subject: refactor(components): extract MetaItem from MetaList * replace `items` prop on MetaList with `children` prop: it was too restrictive and the global options was not really useful. It is better too give control to the consumers. --- src/pages/thematique/[slug].tsx | 92 ++++++++++++++++++++--------------------- 1 file changed, 45 insertions(+), 47 deletions(-) (limited to 'src/pages/thematique/[slug].tsx') diff --git a/src/pages/thematique/[slug].tsx b/src/pages/thematique/[slug].tsx index ea8c6b0..9220ccd 100644 --- a/src/pages/thematique/[slug].tsx +++ b/src/pages/thematique/[slug].tsx @@ -9,10 +9,11 @@ import { getLayout, Heading, LinksWidget, - type MetaItemData, PageLayout, PostsList, Time, + MetaList, + MetaItem, } from '../../components'; import { getAllThematicsSlugs, @@ -53,51 +54,6 @@ const ThematicPage: NextPageWithLayout = ({ url: `${ROUTES.THEMATICS.INDEX}/${slug}`, }); - const headerMeta: (MetaItemData | undefined)[] = [ - { - id: 'publication-date', - label: intl.formatMessage({ - defaultMessage: 'Published on:', - description: 'ThematicPage: publication date label', - id: 'UTGhUU', - }), - value: